import "dart:core";

void main() {
    print('单引号');
    print("双引号");
    print("双引号'里面有'单引号");
    print('单引号"里面有"双引号');
    print("a" + "b");/*连接字符串*/
    print("直接""挨在一起");/*连接字符串*/
    print("直接" "挨在一起");/*连接字符串*/
    print("-" * 10);/*重复次数*/
    print('a1\nb1');/*会换行*/
    print("a11\nb11");/*会换行*/
    print(r"a111\nb111");/*不会换行，原样输出*/
    var data1 = '''
    a
    b
    c
    ''';
    var data2 = """
    d
    e
    f
    """;
    print(data1);
    print(data2);
    print("0123456789".substring(0, 5));/*01234*/
    var string = 'dart';
    print('${string} has ${string.length} letters');
    print('''${string} has ${string.length} letters''');
    print(string.codeUnitAt(1));/*第2个字母的ascii码为97*/
    print(string.codeUnits);/*[100, 97, 114, 116]*/
    print(string.runes.toList());/*[100, 97, 114, 116]*/
    print(string[1]);/*a*/
}